<?php

namespace app\service;

use app\tool\SingletonTrait;

class TenantGroupService
{
    use SingletonTrait;

    /**
     * 查询项目成员信息
     * @param $tenant_id
     * @param array $allTenantIdList
     * @param string $selectTenantStepCategory
     * @param string $selectTenantAddress
     * @return mixed
     */
    public function getTenantGroupMemberByProject($tenant_id, array $allTenantIdList, string $selectTenantStepCategory, string $selectTenantAddress)
    {
        return teamones_request('teamones-im', 'tenant_group_member/get_tenant_group_member_by_project', [
            'param' => [
                'filter' => [
                    'project_tenant_id' => $tenant_id,
                    'all_project_tenant_id' => $allTenantIdList,
                    'options' => [
                        'select_tenant_address' => $selectTenantAddress,
                        'select_tenant_step_category' => $selectTenantStepCategory,
                    ]
                ]
            ],
        ])['data'];
    }
}
